//
//  TTUpDownButton.m
//  TaoTuo
//
//  Created by admin on 2019/8/26.
//  Copyright © 2019 admin. All rights reserved.
//

#import "TTUpDownButton.h"

@implementation TTUpDownButton

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        self.titleLabel.textAlignment = NSTextAlignmentCenter;
        self.imageView.contentMode = UIViewContentModeCenter;
    }
    return self;
}


- (CGRect)imageRectForContentRect:(CGRect)contentRect
{
    return CGRectMake(0, 0, self.width, contentRect.size.height * 0.6);
}

- (CGRect)titleRectForContentRect:(CGRect)contentRect
{
    return CGRectMake(0, self.imageView.bottom, self.width, self.height - self.imageView.height);
}

@end
